import numpy as np
import matplotlib.pyplot as plt

nsteps=1000
draws=np.random.randint(0,2,size=nsteps)
print((draws))

# arr=np.random.randn(2,2)
# print(arr)
# print(arr.mean())
# print(arr.cumsum())
# points = np.arange(-5, 5, 0.01)
# # print(points)
# xs, ys = np.meshgrid(points, points)
# z = np.sqrt(xs ** 2 + ys ** 2)
# plt.title(r'$\sqrt{x^2+y^2}$')
# plt.imshow(z, cmap =plt.cm.gray)
# plt.colorbar()
#
# plt.show()


# print(xs)
# print(ys)
# arr2d = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
# arr2d = np.array(arr2d)
# arr2d[arr2d % 2 == 0]=0
# # print(arr2d)
#
# print(np.arange(24).reshape((2,3,4)))
# print(arr2d.shape)
# print(arr2d[1][:2])


# data = [[1, 23, 34], [1, 23, 34]]
# ndarr = np.array(data)
# print(ndarr.shape, ndarr.dtype)
# print(np.empty((2, 3)))
# print(np.identity(5))
# numeric_string = np.array(['1.23', '22.3'], np.string_)
# print(numeric_string)
# print(ndarr.astype(int))
# arr = np.arange(10)
# print(arr)
# arr_slice=arr[5:8]
# arr_slice[1]=123456
# print(arr)
# arr_slice[:]=64
# print(arr)
# tmp = [1, 23, 4, 5, 8]
# tmp = np.array(tmp)
# print((arr2d % 2 == 0) | (arr2d % 2 != 0))
